<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/**
<span class='line'>  2</span>  * Abstract; see an implementing class for details.
<span class='line'>  3</span>  *
<span class='line'>  4</span>  * @class Represents a reusable interaction; applies an interactive behavior to
<span class='line'>  5</span>  * a given mark. Behaviors are themselves functions designed to be used as event
<span class='line'>  6</span>  * handlers. For example, to add pan and zoom support to any panel, say:
<span class='line'>  7</span>  *
<span class='line'>  8</span>  * &lt;pre>    .event("mousedown", pv.Behavior.pan())
<span class='line'>  9</span>  *     .event("mousewheel", pv.Behavior.zoom())&lt;/pre>
<span class='line'> 10</span>  *
<span class='line'> 11</span>  * The behavior should be registered on the event that triggers the start of the
<span class='line'> 12</span>  * behavior. Typically, the behavior will take care of registering for any
<span class='line'> 13</span>  * additional events that are necessary. For example, dragging starts on
<span class='line'> 14</span>  * mousedown, while the drag behavior automatically listens for mousemove and
<span class='line'> 15</span>  * mouseup events on the window. By listening to the window, the behavior can
<span class='line'> 16</span>  * continue to receive mouse events even if the mouse briefly leaves the mark
<span class='line'> 17</span>  * being dragged, or even the root panel.
<span class='line'> 18</span>  *
<span class='line'> 19</span>  * &lt;p>Each behavior implementation has specific requirements as to which events
<span class='line'> 20</span>  * it supports, and how it should be used. For example, the drag behavior
<span class='line'> 21</span>  * requires that the data associated with the mark be an object with &lt;tt>x&lt;/tt>
<span class='line'> 22</span>  * and &lt;tt>y&lt;/tt> attributes, such as a {@link pv.Vector}, storing the mark's
<span class='line'> 23</span>  * position. See an implementing class for details.
<span class='line'> 24</span>  *
<span class='line'> 25</span>  * @see pv.Behavior.drag
<span class='line'> 26</span>  * @see pv.Behavior.pan
<span class='line'> 27</span>  * @see pv.Behavior.point
<span class='line'> 28</span>  * @see pv.Behavior.select
<span class='line'> 29</span>  * @see pv.Behavior.zoom
<span class='line'> 30</span>  * @extends function
<span class='line'> 31</span>  */</span><span class="WHIT">
<span class='line'> 32</span> </span><span class="NAME">pv.Behavior</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 33</span> </span></pre></body></html>